<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<div>
	<h1>This is a start page.</h1>
</div>

<sec:authorize access="isAnonymous()">
	<div>
		<div class="title">Please, login</div>
		<div class="content">
			<a href="${pageContext.request.contextPath}/fb/access.html">access</a><br/>		
		</div>
	</div>
</sec:authorize>	
<sec:authorize access="isAuthenticated()">
	<div>
		<div class="title">Congratulations! You entered in site</div>
		<div class="content">
			<dl>
				<dt>First name: </dt>
				<dd>${firstName}</dd>
				
				<dt>Last name: </dt>
				<dd>${lastName}</dd>
				
				<dt>Facebook id: </dt>
				<dd>${facebookId}</dd>
			</dl>
		</div>
	</div>
	
	<sec:authorize access="hasRole('ADMINISTRATOR')">
		<h3>I am administrator :)</h3>
	</sec:authorize>
	<sec:authorize access="hasRole('USER')">
		<h3>I am user.</h3>
	</sec:authorize>
	<br/><a href="${pageContext.request.contextPath}/signout">signout</a><br/>
</sec:authorize>
<!-- 
http://www.pvsm.ru/java/9417
 -->